package com.jy.admin.services.cashPocket.vo;

import com.fqgj.common.api.ResponseData;
import com.jy.admin.db.entity.CeAgentAccountEntity;

import java.util.ArrayList;
import java.util.List;

public class FailAccountListResponse implements ResponseData {

    private List<Item> list = new ArrayList<>();

    public FailAccountListResponse(List<CeAgentAccountEntity> ceAgentAccountEntities) {
        ceAgentAccountEntities.forEach(agentAccountEntity -> {
            list.add(new Item(agentAccountEntity.getAgentCode(),agentAccountEntity.getAccount(),agentAccountEntity.getPassword(),agentAccountEntity.getLoginStatus(),
                    agentAccountEntity.getAppName(),agentAccountEntity.getMerchantCode()));

        });
    }

    public class Item implements ResponseData{
        /**
         *商户标识
         */
        private String agentCode;
        /**
         *帐号
         */
        private String account;
        private String password;

        /**
         *登陆状态 0 未登录 1已经登陆
         */
        private Integer loginStatus;
        /**
         *商户标识
         */
        private String appName;
        /**
         *商户标识
         */
        private String merchantCode;

        public Item(String agentCode, String account, String password, Integer loginStatus, String appName, String merchantCode) {
            this.agentCode = agentCode;
            this.account = account;
            this.password = password;
            this.loginStatus = loginStatus;
            this.appName = appName;
            this.merchantCode = merchantCode;
        }
    }
}
